<script setup lang="ts">
import { useCounterStore } from "./stores/counter";

// 调用函数，获取数据仓库
const store = useCounterStore();
</script>

<template>
  <h1>Vue状态管理</h1>
  <p>store:{{ store }}</p>
  <p>totalCount:{{ store.totalCount }}</p>
  <p>doubleTtotalCount:{{ store.doubleTtotalCount }}</p>
  <button @click="store.addtotalCount(1)">修改store数据+1</button>
  <button @click="store.addtotalCount(10)">修改store数据+10</button>
</template>

<style scoped></style>
